3.4.6 \(\int \tan ^5(e+f x) (a+b \tan ^2(e+f x))^{3/2} \, dx\) [306]

3.4.6.1 Optimal result
3.4.6.2 Mathematica [A] (verified)
3.4.6.3 Rubi [A] (verified)
3.4.6.4 Maple [B] (verified)
3.4.6.5 Fricas [A] (verification not implemented)
3.4.6.6 Sympy [F]
3.4.6.7 Maxima [F]
3.4.6.8 Giac [F(-1)]
3.4.6.9 Mupad [B] (verification not implemented)

3.4.6.1 Optimal result

Integrand size = 25, antiderivative size = 145 \[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^{3/2} \, dx=-\frac {(a-b)^{3/2} \text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a-b}}\right )}{f}+\frac {(a-b) \sqrt {a+b \tan ^2(e+f x)}}{f}+\frac {\left (a+b \tan ^2(e+f x)\right )^{3/2}}{3 f}-\frac {(a+b) \left (a+b \tan ^2(e+f x)\right )^{5/2}}{5 b^2 f}+\frac {\left (a+b \tan ^2(e+f x)\right )^{7/2}}{7 b^2 f} \]

output
-(a-b)^(3/2)*arctanh((a+b*tan(f*x+e)^2)^(1/2)/(a-b)^(1/2))/f+(a-b)*(a+b*ta 
n(f*x+e)^2)^(1/2)/f+1/3*(a+b*tan(f*x+e)^2)^(3/2)/f-1/5*(a+b)*(a+b*tan(f*x+ 
e)^2)^(5/2)/b^2/f+1/7*(a+b*tan(f*x+e)^2)^(7/2)/b^2/f
 
3.4.6.2 Mathematica [A] (verified)

Time = 1.51 (sec) , antiderivative size = 139, normalized size of antiderivative = 0.96 \[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^{3/2} \, dx=\frac {\frac {2}{3} \left (a+b \tan ^2(e+f x)\right )^{3/2}-\frac {2 (a+b) \left (a+b \tan ^2(e+f x)\right )^{5/2}}{5 b^2}+\frac {2 \left (a+b \tan ^2(e+f x)\right )^{7/2}}{7 b^2}+2 (a-b) \left (-\sqrt {a-b} \text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a-b}}\right )+\sqrt {a+b \tan ^2(e+f x)}\right )}{2 f} \]

input
Integrate[Tan[e + f*x]^5*(a + b*Tan[e + f*x]^2)^(3/2),x]
 
output
((2*(a + b*Tan[e + f*x]^2)^(3/2))/3 - (2*(a + b)*(a + b*Tan[e + f*x]^2)^(5 
/2))/(5*b^2) + (2*(a + b*Tan[e + f*x]^2)^(7/2))/(7*b^2) + 2*(a - b)*(-(Sqr 
t[a - b]*ArcTanh[Sqrt[a + b*Tan[e + f*x]^2]/Sqrt[a - b]]) + Sqrt[a + b*Tan 
[e + f*x]^2]))/(2*f)
 
3.4.6.3 Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 138, normalized size of antiderivative = 0.95, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3042, 4153, 354, 99, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^{3/2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \tan (e+f x)^5 \left (a+b \tan (e+f x)^2\right )^{3/2}dx\)

\(\Big \downarrow \) 4153

\(\displaystyle \frac {\int \frac {\tan ^5(e+f x) \left (b \tan ^2(e+f x)+a\right )^{3/2}}{\tan ^2(e+f x)+1}d\tan (e+f x)}{f}\)

\(\Big \downarrow \) 354

\(\displaystyle \frac {\int \frac {\tan ^4(e+f x) \left (b \tan ^2(e+f x)+a\right )^{3/2}}{\tan ^2(e+f x)+1}d\tan ^2(e+f x)}{2 f}\)

\(\Big \downarrow \) 99

\(\displaystyle \frac {\int \left (\frac {\left (b \tan ^2(e+f x)+a\right )^{5/2}}{b}+\frac {(-a-b) \left (b \tan ^2(e+f x)+a\right )^{3/2}}{b}+\frac {\left (b \tan ^2(e+f x)+a\right )^{3/2}}{\tan ^2(e+f x)+1}\right )d\tan ^2(e+f x)}{2 f}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-2 (a-b)^{3/2} \text {arctanh}\left (\frac {\sqrt {a+b \tan ^2(e+f x)}}{\sqrt {a-b}}\right )+\frac {2 \left (a+b \tan ^2(e+f x)\right )^{7/2}}{7 b^2}-\frac {2 (a+b) \left (a+b \tan ^2(e+f x)\right )^{5/2}}{5 b^2}+\frac {2}{3} \left (a+b \tan ^2(e+f x)\right )^{3/2}+2 (a-b) \sqrt {a+b \tan ^2(e+f x)}}{2 f}\)

input
Int[Tan[e + f*x]^5*(a + b*Tan[e + f*x]^2)^(3/2),x]
 
output
(-2*(a - b)^(3/2)*ArcTanh[Sqrt[a + b*Tan[e + f*x]^2]/Sqrt[a - b]] + 2*(a - 
 b)*Sqrt[a + b*Tan[e + f*x]^2] + (2*(a + b*Tan[e + f*x]^2)^(3/2))/3 - (2*( 
a + b)*(a + b*Tan[e + f*x]^2)^(5/2))/(5*b^2) + (2*(a + b*Tan[e + f*x]^2)^( 
7/2))/(7*b^2))/(2*f)
 

3.4.6.3.1 Defintions of rubi rules used

rule 99
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], 
 x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] && (IntegerQ[p] | 
| (GtQ[m, 0] && GeQ[n, -1]))
 

rule 354
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_S 
ymbol] :> Simp[1/2   Subst[Int[x^((m - 1)/2)*(a + b*x)^p*(c + d*x)^q, x], x 
, x^2], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && IntegerQ 
[(m - 1)/2]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4153
Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + 
(f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], 
 x]}, Simp[c*(ff/f)   Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2 + f 
f^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, 
n, p}, x] && (IGtQ[p, 0] || EqQ[n, 2] || EqQ[n, 4] || (IntegerQ[p] && Ratio 
nalQ[n]))
 
3.4.6.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(255\) vs. \(2(125)=250\).

Time = 0.08 (sec) , antiderivative size = 256, normalized size of antiderivative = 1.77

method result size
derivativedivides \(\frac {\tan \left (f x +e \right )^{2} \left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {5}{2}}}{7 f b}-\frac {2 a \left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {5}{2}}}{35 f \,b^{2}}-\frac {\left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {5}{2}}}{5 b f}+\frac {b \tan \left (f x +e \right )^{2} \sqrt {a +b \tan \left (f x +e \right )^{2}}}{3 f}+\frac {4 a \sqrt {a +b \tan \left (f x +e \right )^{2}}}{3 f}-\frac {b \sqrt {a +b \tan \left (f x +e \right )^{2}}}{f}+\frac {b^{2} \arctan \left (\frac {\sqrt {a +b \tan \left (f x +e \right )^{2}}}{\sqrt {-a +b}}\right )}{f \sqrt {-a +b}}-\frac {2 a b \arctan \left (\frac {\sqrt {a +b \tan \left (f x +e \right )^{2}}}{\sqrt {-a +b}}\right )}{f \sqrt {-a +b}}+\frac {a^{2} \arctan \left (\frac {\sqrt {a +b \tan \left (f x +e \right )^{2}}}{\sqrt {-a +b}}\right )}{f \sqrt {-a +b}}\) \(256\)
default \(\frac {\tan \left (f x +e \right )^{2} \left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {5}{2}}}{7 f b}-\frac {2 a \left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {5}{2}}}{35 f \,b^{2}}-\frac {\left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {5}{2}}}{5 b f}+\frac {b \tan \left (f x +e \right )^{2} \sqrt {a +b \tan \left (f x +e \right )^{2}}}{3 f}+\frac {4 a \sqrt {a +b \tan \left (f x +e \right )^{2}}}{3 f}-\frac {b \sqrt {a +b \tan \left (f x +e \right )^{2}}}{f}+\frac {b^{2} \arctan \left (\frac {\sqrt {a +b \tan \left (f x +e \right )^{2}}}{\sqrt {-a +b}}\right )}{f \sqrt {-a +b}}-\frac {2 a b \arctan \left (\frac {\sqrt {a +b \tan \left (f x +e \right )^{2}}}{\sqrt {-a +b}}\right )}{f \sqrt {-a +b}}+\frac {a^{2} \arctan \left (\frac {\sqrt {a +b \tan \left (f x +e \right )^{2}}}{\sqrt {-a +b}}\right )}{f \sqrt {-a +b}}\) \(256\)

input
int(tan(f*x+e)^5*(a+b*tan(f*x+e)^2)^(3/2),x,method=_RETURNVERBOSE)
 
output
1/7/f*tan(f*x+e)^2*(a+b*tan(f*x+e)^2)^(5/2)/b-2/35/f*a/b^2*(a+b*tan(f*x+e) 
^2)^(5/2)-1/5*(a+b*tan(f*x+e)^2)^(5/2)/b/f+1/3/f*b*tan(f*x+e)^2*(a+b*tan(f 
*x+e)^2)^(1/2)+4/3/f*a*(a+b*tan(f*x+e)^2)^(1/2)-b*(a+b*tan(f*x+e)^2)^(1/2) 
/f+1/f*b^2/(-a+b)^(1/2)*arctan((a+b*tan(f*x+e)^2)^(1/2)/(-a+b)^(1/2))-2/f* 
a*b/(-a+b)^(1/2)*arctan((a+b*tan(f*x+e)^2)^(1/2)/(-a+b)^(1/2))+1/f*a^2/(-a 
+b)^(1/2)*arctan((a+b*tan(f*x+e)^2)^(1/2)/(-a+b)^(1/2))
 
3.4.6.5 Fricas [A] (verification not implemented)

Time = 0.35 (sec) , antiderivative size = 414, normalized size of antiderivative = 2.86 \[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^{3/2} \, dx=\left [-\frac {105 \, {\left (a b^{2} - b^{3}\right )} \sqrt {a - b} \log \left (-\frac {b^{2} \tan \left (f x + e\right )^{4} + 2 \, {\left (4 \, a b - 3 \, b^{2}\right )} \tan \left (f x + e\right )^{2} + 4 \, {\left (b \tan \left (f x + e\right )^{2} + 2 \, a - b\right )} \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {a - b} + 8 \, a^{2} - 8 \, a b + b^{2}}{\tan \left (f x + e\right )^{4} + 2 \, \tan \left (f x + e\right )^{2} + 1}\right ) - 4 \, {\left (15 \, b^{3} \tan \left (f x + e\right )^{6} + 3 \, {\left (8 \, a b^{2} - 7 \, b^{3}\right )} \tan \left (f x + e\right )^{4} - 6 \, a^{3} - 21 \, a^{2} b + 140 \, a b^{2} - 105 \, b^{3} + {\left (3 \, a^{2} b - 42 \, a b^{2} + 35 \, b^{3}\right )} \tan \left (f x + e\right )^{2}\right )} \sqrt {b \tan \left (f x + e\right )^{2} + a}}{420 \, b^{2} f}, \frac {105 \, {\left (a b^{2} - b^{3}\right )} \sqrt {-a + b} \arctan \left (\frac {2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a + b}}{b \tan \left (f x + e\right )^{2} + 2 \, a - b}\right ) + 2 \, {\left (15 \, b^{3} \tan \left (f x + e\right )^{6} + 3 \, {\left (8 \, a b^{2} - 7 \, b^{3}\right )} \tan \left (f x + e\right )^{4} - 6 \, a^{3} - 21 \, a^{2} b + 140 \, a b^{2} - 105 \, b^{3} + {\left (3 \, a^{2} b - 42 \, a b^{2} + 35 \, b^{3}\right )} \tan \left (f x + e\right )^{2}\right )} \sqrt {b \tan \left (f x + e\right )^{2} + a}}{210 \, b^{2} f}\right ] \]

input
integrate(tan(f*x+e)^5*(a+b*tan(f*x+e)^2)^(3/2),x, algorithm="fricas")
 
output
[-1/420*(105*(a*b^2 - b^3)*sqrt(a - b)*log(-(b^2*tan(f*x + e)^4 + 2*(4*a*b 
 - 3*b^2)*tan(f*x + e)^2 + 4*(b*tan(f*x + e)^2 + 2*a - b)*sqrt(b*tan(f*x + 
 e)^2 + a)*sqrt(a - b) + 8*a^2 - 8*a*b + b^2)/(tan(f*x + e)^4 + 2*tan(f*x 
+ e)^2 + 1)) - 4*(15*b^3*tan(f*x + e)^6 + 3*(8*a*b^2 - 7*b^3)*tan(f*x + e) 
^4 - 6*a^3 - 21*a^2*b + 140*a*b^2 - 105*b^3 + (3*a^2*b - 42*a*b^2 + 35*b^3 
)*tan(f*x + e)^2)*sqrt(b*tan(f*x + e)^2 + a))/(b^2*f), 1/210*(105*(a*b^2 - 
 b^3)*sqrt(-a + b)*arctan(2*sqrt(b*tan(f*x + e)^2 + a)*sqrt(-a + b)/(b*tan 
(f*x + e)^2 + 2*a - b)) + 2*(15*b^3*tan(f*x + e)^6 + 3*(8*a*b^2 - 7*b^3)*t 
an(f*x + e)^4 - 6*a^3 - 21*a^2*b + 140*a*b^2 - 105*b^3 + (3*a^2*b - 42*a*b 
^2 + 35*b^3)*tan(f*x + e)^2)*sqrt(b*tan(f*x + e)^2 + a))/(b^2*f)]
 
3.4.6.6 Sympy [F]

\[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^{3/2} \, dx=\int \left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{\frac {3}{2}} \tan ^{5}{\left (e + f x \right )}\, dx \]

input
integrate(tan(f*x+e)**5*(a+b*tan(f*x+e)**2)**(3/2),x)
 
output
Integral((a + b*tan(e + f*x)**2)**(3/2)*tan(e + f*x)**5, x)
 
3.4.6.7 Maxima [F]

\[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^{3/2} \, dx=\int { {\left (b \tan \left (f x + e\right )^{2} + a\right )}^{\frac {3}{2}} \tan \left (f x + e\right )^{5} \,d x } \]

input
integrate(tan(f*x+e)^5*(a+b*tan(f*x+e)^2)^(3/2),x, algorithm="maxima")
 
output
integrate((b*tan(f*x + e)^2 + a)^(3/2)*tan(f*x + e)^5, x)
 
3.4.6.8 Giac [F(-1)]

Timed out. \[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^{3/2} \, dx=\text {Timed out} \]

input
integrate(tan(f*x+e)^5*(a+b*tan(f*x+e)^2)^(3/2),x, algorithm="giac")
 
output
Timed out
 
3.4.6.9 Mupad [B] (verification not implemented)

Time = 41.29 (sec) , antiderivative size = 233, normalized size of antiderivative = 1.61 \[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right )^{3/2} \, dx=\frac {{\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )}^{7/2}}{7\,b^2\,f}-\left (\frac {2\,a}{5\,b^2\,f}-\frac {a-b}{5\,b^2\,f}\right )\,{\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )}^{5/2}-\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,\left (a-b\right )\,\left (\left (\frac {2\,a}{b^2\,f}-\frac {a-b}{b^2\,f}\right )\,\left (a-b\right )-\frac {a^2}{b^2\,f}\right )-{\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )}^{3/2}\,\left (\frac {\left (\frac {2\,a}{b^2\,f}-\frac {a-b}{b^2\,f}\right )\,\left (a-b\right )}{3}-\frac {a^2}{3\,b^2\,f}\right )+\frac {\mathrm {atan}\left (\frac {\sqrt {b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a}\,{\left (a-b\right )}^{3/2}\,1{}\mathrm {i}}{a^2-2\,a\,b+b^2}\right )\,{\left (a-b\right )}^{3/2}\,1{}\mathrm {i}}{f} \]

input
int(tan(e + f*x)^5*(a + b*tan(e + f*x)^2)^(3/2),x)
 
output
(a + b*tan(e + f*x)^2)^(7/2)/(7*b^2*f) - ((2*a)/(5*b^2*f) - (a - b)/(5*b^2 
*f))*(a + b*tan(e + f*x)^2)^(5/2) - (a + b*tan(e + f*x)^2)^(1/2)*(a - b)*( 
((2*a)/(b^2*f) - (a - b)/(b^2*f))*(a - b) - a^2/(b^2*f)) - (a + b*tan(e + 
f*x)^2)^(3/2)*((((2*a)/(b^2*f) - (a - b)/(b^2*f))*(a - b))/3 - a^2/(3*b^2* 
f)) + (atan(((a + b*tan(e + f*x)^2)^(1/2)*(a - b)^(3/2)*1i)/(a^2 - 2*a*b + 
 b^2))*(a - b)^(3/2)*1i)/f